<?php

namespace common\models\linkedcare;

use Yii;

/**
 * This is the model class for table "{{%fy_linkedcare_patients_order_detail}}".
 *
 * @property int $id
 * @property int $chargeOrderId
 * @property int $sourceDetailId
 * @property int $chargeItemId
 * @property string|null $itemName 项目名称
 * @property string|null $count 数量
 * @property string|null $unit 单位
 * @property float|null $price 单价
 * @property float|null $totalPrice 金额
 * @property int $doctorId
 * @property string|null $doctorName 医生
 * @property int $consultantId
 * @property string|null $consultantName 咨询师
 * @property int $onlineConsultantId
 * @property string|null $onlineConsultantName 网电咨询师
 * @property string|null $allowDiscount
 * @property string|null $allowOrderDiscount
 * @property float|null $discount
 * @property string|null $itemType
 * @property string|null $itemSuperType
 * @property string|null $isGift
 * @property float|null $actualPrice
 * @property float|null $srcPlanPrice
 * @property float|null $planPrice
 * @property float|null $originalPrice
 * @property float|null $advancePlanPrice
 * @property string|null $deductionCode
 * @property string|null $stepName
 * @property string|null $isPending
 * @property string|null $confirmTime
 * @property string|null $isDealt
 * @property string $created_time 创建时间
 * @property string $updated_time 更新时间
 */
class LinkedcarePatientsOrderDetail extends \common\models\base\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%fy_linkedcare_patients_order_detail}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['id', 'chargeOrderId', 'sourceDetailId', 'chargeItemId', 'doctorId', 'consultantId', 'onlineConsultantId'], 'integer'],
            [['price', 'totalPrice', 'discount', 'actualPrice', 'srcPlanPrice', 'planPrice', 'originalPrice', 'advancePlanPrice'], 'number'],
            [['created_time', 'updated_time'], 'safe'],
            [['itemName'], 'string', 'max' => 200],
            [['count', 'unit', 'allowDiscount', 'allowOrderDiscount', 'isGift', 'isPending', 'confirmTime', 'isDealt'], 'string', 'max' => 30],
            [['doctorName', 'consultantName', 'onlineConsultantName', 'itemType', 'itemSuperType', 'deductionCode', 'stepName'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'chargeOrderId' => 'Charge Order ID',
            'sourceDetailId' => 'Source Detail ID',
            'chargeItemId' => 'Charge Item ID',
            'itemName' => '项目名称',
            'count' => '数量',
            'unit' => '单位',
            'price' => '单价',
            'totalPrice' => '金额',
            'doctorId' => 'Doctor ID',
            'doctorName' => '医生',
            'consultantId' => 'Consultant ID',
            'consultantName' => '咨询师',
            'onlineConsultantId' => 'Online Consultant ID',
            'onlineConsultantName' => '网电咨询师',
            'allowDiscount' => 'Allow Discount',
            'allowOrderDiscount' => 'Allow Order Discount',
            'discount' => 'Discount',
            'itemType' => 'Item Type',
            'itemSuperType' => 'Item Super Type',
            'isGift' => 'Is Gift',
            'actualPrice' => 'Actual Price',
            'srcPlanPrice' => 'Src Plan Price',
            'planPrice' => 'Plan Price',
            'originalPrice' => 'Original Price',
            'advancePlanPrice' => 'Advance Plan Price',
            'deductionCode' => 'Deduction Code',
            'stepName' => 'Step Name',
            'isPending' => 'Is Pending',
            'confirmTime' => 'Confirm Time',
            'isDealt' => 'Is Dealt',
            'created_time' => '创建时间',
            'updated_time' => '更新时间',
        ];
    }
}
